.class Ldgb/b$d;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Ldgb/b;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "d"
.end annotation


# instance fields
.field final a:Landroid/content/Intent;

.field final synthetic b:Ldgb/b;


# direct methods
.method public constructor <init>(Ldgb/b;Landroid/content/Intent;)V
    .locals 0

    .line 1
    iput-object p1, p0, Ldgb/b$d;->b:Ldgb/b;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p2, p0, Ldgb/b$d;->a:Landroid/content/Intent;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .line 1
    sget-boolean v0, Ldgb/z;->b:Z

    const-string v1, "stat.AppInfoService"

    if-eqz v0, :cond_0

    .line 2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Enter in handleAppAction!\nAction received: "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Ldgb/b$d;->a:Landroid/content/Intent;

    invoke-virtual {v2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 3
    :cond_0
    iget-object v0, p0, Ldgb/b$d;->a:Landroid/content/Intent;

    invoke-virtual {v0}, Landroid/content/Intent;->getDataString()Ljava/lang/String;

    move-result-object v0

    const/16 v2, 0x8

    invoke-virtual {v0, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    const/4 v2, 0x0

    .line 4
    iget-object v3, p0, Ldgb/b$d;->a:Landroid/content/Intent;

    invoke-virtual {v3}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v3

    const-string v4, "android.intent.action.PACKAGE_ADDED"

    invoke-virtual {v4, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    const/4 v4, 0x1

    const/4 v5, 0x0

    if-eqz v3, :cond_3

    .line 5
    invoke-static {}, Ldgb/b;->d()Z

    move-result v3

    if-eqz v3, :cond_2

    .line 6
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_1

    const-string v0, "This add broadcast is Update action!"

    .line 7
    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 8
    :cond_1
    invoke-static {v5}, Ldgb/b;->a(Z)Z

    :goto_0
    const/4 v4, 0x0

    goto :goto_1

    :cond_2
    const-string v2, "install"

    .line 9
    invoke-static {v0, v2}, Ldgb/x;->a(Ljava/lang/String;Ljava/lang/String;)Ldgb/c;

    move-result-object v2

    goto :goto_1

    .line 10
    :cond_3
    iget-object v3, p0, Ldgb/b$d;->a:Landroid/content/Intent;

    invoke-virtual {v3}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v3

    const-string v6, "android.intent.action.PACKAGE_REMOVED"

    invoke-virtual {v6, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_6

    const-string v2, "uninstall"

    .line 11
    invoke-static {v0, v2}, Ldgb/x;->a(Ljava/lang/String;Ljava/lang/String;)Ldgb/c;

    move-result-object v2

    .line 12
    invoke-virtual {v2}, Ldgb/c;->b()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_5

    .line 13
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_4

    const-string v0, "This remove broadcast is Update action!"

    .line 14
    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 15
    :cond_4
    invoke-static {v4}, Ldgb/b;->a(Z)Z

    goto :goto_0

    .line 16
    :cond_5
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    invoke-virtual {v2, v5, v6}, Ldgb/c;->a(J)V

    goto :goto_1

    .line 17
    :cond_6
    iget-object v3, p0, Ldgb/b$d;->a:Landroid/content/Intent;

    invoke-virtual {v3}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v3

    const-string v6, "android.intent.action.PACKAGE_REPLACED"

    invoke-virtual {v6, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_7

    const-string v2, "change"

    .line 18
    invoke-static {v0, v2}, Ldgb/x;->a(Ljava/lang/String;Ljava/lang/String;)Ldgb/c;

    move-result-object v2

    .line 19
    invoke-static {v5}, Ldgb/b;->a(Z)Z

    :cond_7
    :goto_1
    if-eqz v4, :cond_a

    .line 20
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_8

    .line 21
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "[packageName:"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ldgb/c;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "][actionType:"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 22
    invoke-virtual {v2}, Ldgb/c;->g()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "] is to put into DB!"

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 23
    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 24
    :cond_8
    iget-object v0, p0, Ldgb/b$d;->b:Ldgb/b;

    invoke-static {v0, v2}, Ldgb/b;->a(Ldgb/b;Ldgb/c;)Z

    move-result v0

    .line 25
    invoke-static {v2}, Ldgb/x;->a(Ldgb/c;)Z

    move-result v3

    if-nez v3, :cond_9

    .line 26
    invoke-static {v2}, Ldgb/x;->b(Ldgb/c;)V

    .line 27
    :cond_9
    sget-boolean v2, Ldgb/z;->b:Z

    if-eqz v2, :cond_a

    .line 28
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Put to db :"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    const-string v0, " and Now used DB size is "

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 29
    invoke-static {}, Ldgb/b;->e()Ldgb/a;

    move-result-object v0

    invoke-virtual {v0}, Ldgb/a;->a()I

    move-result v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, "Byte!"

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 30
    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_a
    return-void
.end method
